LanguageExt.SysX

LanguageExt.SysX Live

Contents

struct ActivitySourceIO Source #

Fields

field ActivitySource Source Source #

Constructors

constructor ActivitySourceIO (ActivitySource source) Source #

Methods

method Activity? StartActivity (string name, ActivityKind kind) Source #

Creates a new activity if there are active listeners for it, using the specified name and activity kind.

Parameters

param name

The operation name of the activity.

param kind

The activity kind.

returns

The created activity object, if it had active listeners, or None if it has no event listeners.

method Activity? StartActivity ( string name, ActivityKind kind, ActivityContext parentContext, HashMap<string,object> tags = default, Seq<ActivityLink> links = default, DateTimeOffset startTime = default) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param kind

The activity kind.

param parentContext

The parent ActivityContext object to initialize the created activity object with

param tags

The optional tags list to initialise the created activity object with.

param links

The optional ActivityLink list to initialise the created activity object with.

param startTime

The optional start timestamp to set on the created activity object.

returns

The created activity object, if it had active listeners, or null if it has no event listeners.

method Activity? StartActivity ( string name, ActivityKind kind, string parentId, HashMap<string,object> tags = default, Seq<ActivityLink> links = default, DateTimeOffset startTime = default) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param kind

The activity kind.

param parentId

The parent Id to initialize the created activity object with.

param tags

The optional tags list to initialise the created activity object with.

param links

The optional ActivityLink list to initialise the created activity object with.

param startTime

The optional start timestamp to set on the created activity object.

returns

The created activity object, if it had active listeners, or null if it has no event listeners.

record RuntimeEnv ( ActivityEnv Activity, CancellationTokenSource Source, CancellationToken Token, Encoding Encoding) Source #

Constructors

constructor RuntimeEnv (ActivityEnv activity, CancellationTokenSource source, Encoding encoding) Source #

Methods

method void Dispose () Source #

struct Runtime Source #

Live IO runtime

Properties

property RuntimeEnv Env Source #

Configuration environment accessor

property Runtime LocalCancel Source #

Create a new Runtime with a fresh cancellation token

Used by localCancel to create new cancellation context for its sub-environment

Parameters

returns

New runtime

property CancellationToken CancellationToken Source #

Direct access to cancellation token

property CancellationTokenSource CancellationTokenSource Source #

Directly access the cancellation token source

Parameters

returns

CancellationTokenSource

property Encoding Encoding Source #

Get encoding

Parameters

returns

property Activity? CurrentActivity Source #

Get the current activity

property Eff<Runtime, LanguageExt.SysX.Traits.ActivitySourceIO> ActivitySourceEff Source #

Activity source environment

Parameters

returns

Operating-system environment environment

property Eff<Runtime, ConsoleIO> ConsoleEff Source #

Access the console environment

Parameters

returns

Console environment

property Eff<Runtime, FileIO> FileEff Source #

Access the file environment

Parameters

returns

File environment

property Eff<Runtime, DirectoryIO> DirectoryEff Source #

Access the directory environment

Parameters

returns

Directory environment

property Eff<Runtime, TextReadIO> TextReadEff Source #

Access the TextReader environment

Parameters

returns

TextReader environment

property Eff<Runtime, TimeIO> TimeEff Source #

Access the time environment

Parameters

returns

Time environment

property Eff<Runtime, EnvironmentIO> EnvironmentEff Source #

Access the operating-system environment

Parameters

returns

Operating-system environment environment

Methods

method Runtime New () Source #

Constructor function

method Runtime New (ActivityEnv activity, CancellationTokenSource source) Source #

Constructor function

Parameters

param activity

Tracing activity

param source

Cancellation token source

method Runtime New (ActivityEnv activity, Encoding encoding) Source #

Constructor function

Parameters

param activity

Tracing activity

param encoding

Text encoding

method Runtime New (ActivityEnv activity, Encoding encoding, CancellationTokenSource source) Source #

Constructor function

Parameters

param activity

Tracing activity

param encoding

Text encoding

param source

Cancellation token source

method Runtime SetActivity (Activity? activity) Source #

Set the current activity and update the ParentId automatically

Parameters

param activity

Activity to set

returns

Updated runtime